home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Code Resources / PopupCDEF 1.3 / Projects / CDEF / Source / PopupCDEF.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-13  |  1.7 KB  |  63 lines  |  [TEXT/CWIE]

  1. /* See the file Distribution for distribution terms.
  2.     (c) Copyright 1994 Ari Halberstadt */
  3.  
  4. /* This file contains definitions for using my popup CDEF.
  5.  
  6.     950623 aih - made compatible with C++
  7.     9506?? aih - split rez definitions into separate header
  8.     9505?? aih - added pragma align for compatability with PPC
  9.     940315 aih - split out of PopupLib.h */
  10.  
  11. #ifndef POPUP_CDEF
  12. #define POPUP_CDEF
  13.  
  14. /*    Include constants that are also used in resources. */
  15. #include "PopupCDEFResources.h"
  16.  
  17. /*    In prior versions of the CDEF, I had all resource definitions
  18.     and C language definitions in one file. Defining
  19.     POPUP_CDEF_RESOURCE_ONLY prevented the C language definitions
  20.     from being compiled. Now, I've decided it's better to separate
  21.     the definitions that are common to C and Rez input files into
  22.     their own header, "PopupCDEFResources.h", so you no longer
  23.     need to define POPUP_CDEF_RESOURCE_ONLY, though I've left
  24.     the test for it in this file for backwards compatability. */
  25. #ifndef POPUP_CDEF_RESOURCE_ONLY
  26.  
  27. #ifndef __CONTROLS__
  28. #include <Controls.h>
  29. #endif
  30.  
  31. #ifndef __MENUS__
  32. #include <Menus.h>
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. /*    This is the same structure as the popupPrivateData record described
  40.     in IM-VI, p3-19. By making this the first element in the popup
  41.     structure, the CDEF is made more compatible with Apple's CDEF. */
  42.  
  43. #if powerc || __powerc
  44.     #pragma options align=mac68k
  45. #endif
  46.  
  47. typedef struct {
  48.     MenuHandle    mHandle;        /* handle to the popup's menu */
  49.     short            mID;            /* id of popup's menu */
  50. } PopupPrivateType, *PopupPrivatePtr, **PopupPrivateHandle;
  51.  
  52. #if powerc || __powerc
  53.     #pragma options align=reset
  54. #endif
  55.  
  56. #ifdef __cplusplus
  57. }
  58. #endif
  59.  
  60. #endif /* POPUP_CDEF_RESOURCE_ONLY */
  61.  
  62. #endif /* POPUP_CDEF */
  63.